import Vue from 'vue'
import Router from 'vue-router'
const Login = () => import('@/page/Login') //登录
const home = () => import('@/page/home')
const tablepage = () => import('@/page/tablepage') //列表
const index = () => import('@/page/index') //首页
const richtext = () => import('@/page/richtext') //富文本编辑器
const exce1 = () => import('@/page/exce1') //401
const exce2 = () => import('@/page/exce2') //404
const slideshow = () => import('@/page/slideshow') //图片轮播

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      redirect:'/Login'
    },
    {
      path: '/',
      name: 'home',
      component: home,
      children:[
        {path:'/tablepage',component:tablepage,name:tablepage},
        {path:'/index',component:index,name:index},
        {path:'/richtext',component:richtext,name:richtext},
        {path:'/exce1',component:exce1,name:exce1},
        {path:'/exce2',component:exce2,name:exce2},
        {path:'/slideshow',component:slideshow,name:slideshow}
      ]
    },
    {
      path:'/Login',
      name:'Login',
      component:Login
    }
  ]
})
